#include "Defines.hpp"
#pragma once
class EventHandlerTrayConnection : public SocketEventHandler
{
public:
	EventHandlerTrayConnection();
	virtual ~EventHandlerTrayConnection();
	static EventHandlerTrayConnection& GetInstance() {
		static EventHandlerTrayConnection instance;
		return instance;
	};
	void onFromNodeRegisterAtTray(SocketBasePtr pSocket);
	void sendRegisterAtMasterRet(SocketBasePtr pSocket, Common::ESimOneErrorCode code);
	void onFromTrayGetAgentInitInfo(Message& msg);
	void setAuthCode(string authCode) { mAuthCode = authCode; };
	void setAuthStatus(bool authStatus) { 
		mAuthStatus = authStatus;
	};
	void setLoginStatus(int loginStatus) { 
		mLoginStatus = loginStatus; 
	};
private:
	bool mbIsConnect;
	SocketBasePtr mTraySocket;

	string mAuthCode;
	bool mAuthStatus;
	int mLoginStatus;
};
